Crate odds [−] [src]
Odds and ends — collection miscellania.
- Utilities for debug-checked, release-unchecked indexing and slicing
- Fixpoint combinator for closures
- String and Vec extensions
The odds crate has the following crate feature flags:
std-vec
- Enable Vec extensions
- Implies
std
std-string
- Enable String extensions
- Implies
std
std
- Enable basic libstd usage.
unstable
.- Optional.
- Requires nightly channel.
- Implement the closure traits for Fix.
If none of the std features are enabled (they are not enabled by default),
then the crate is no_std
.
Rust Version
This version of the crate requires Rust 1.15 or later.
Modules
char |
Extra functions for |
prelude |
prelude of often used traits and functions |
slice |
Extra functions for slices |
stride |
Slice iterator with custom step size |
string |
Extensions to |
vec |
Extensions to |
Structs
Fix |
Fixpoint combinator for rust closures, generalized over the return type. |
Traits
IndexRange |
IndexRange is implemented by Rust's built-in range types, produced
by range syntax like |
Functions
debug_assert_unreachable⚠ |
Act as |
fix |
Fixpoint combinator for rust closures, generalized over the return type. |
get_unchecked⚠ |
[ Deprecated ] Use |
get_unchecked_mut⚠ |
[ Deprecated ] Use |
ptr_eq |
[ Deprecated ] Compare if a and b are equal pointers. |
raw_byte_repr⚠ |
Safe to use with any wholly initialized memory |
ref_eq |
[ Deprecated ] Compare if a and b are equal as pointers. |
ref_slice |
Create a length 1 slice out of a reference |
ref_slice_mut |
Create a length 1 mutable slice out of a reference |
slice_unchecked⚠ |
[ Deprecated ] Check slicing bounds in debug mode, otherwise just act as an unchecked slice call. |
slice_unchecked_mut⚠ |
[ Deprecated ] Check slicing bounds in debug mode, otherwise just act as an unchecked slice call. |